package io.renren.modules.base.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import io.renren.modules.base.entity.SysPushAd;
import io.renren.modules.base.mapper.SysPushAdMapper;

/**
 * @author kk
 * 广告页增删改查
 */
@Service
public class AdvertisementServiecImpl {

	@Autowired
	SysPushAdMapper sysPushAdMapper;
	
	
	/**
	 * 查询广告
	 * @return 
	 */
	public List<SysPushAd> queryAdvertisement() {
		return sysPushAdMapper.selectList(new QueryWrapper<SysPushAd>()
												.eq("state", Byte.valueOf("1"))
												.orderBy(false, false, "create_time")
												//("create_time", false)
												);
	}

}